//
//  SearchMapPoiModel.h
//  o_amap
//
//  Created by Q神 on 2021/4/12.
//

#import <Foundation/Foundation.h>
#import <AMapSearchKit/AMapSearchKit.h>
#import "LatLngModel.h"

@class SearchMapIndoorData;
@class SearchMapImage;
@class SearchMapPOIExtension;
@class SearchMapSubPOI;
@class SearchMapGeoPoint;

NS_ASSUME_NONNULL_BEGIN

@interface SearchMapPoiModel : NSObject

///POI全局唯一ID
@property (nonatomic, copy)   NSString     *poiId;
///名称
@property (nonatomic, copy)   NSString     *title;
///兴趣点类型
@property (nonatomic, copy)   NSString     *typeDes;
///类型编码
@property (nonatomic, copy)   NSString     *typeCode;
///经纬度
@property (nonatomic, strong)   LatLngModel *latLonPoint;
///地址
@property (nonatomic, copy)   NSString     *snippet;
///电话
@property (nonatomic, copy)   NSString     *tel;
///距中心点的距离，单位米。在周边搜索时有效
@property (nonatomic, assign) NSInteger     distance;
///停车场类型，地上、地下、路边
@property (nonatomic, copy)   NSString     *parkingType;
///商铺id
@property (nonatomic, copy)   NSString     *shopID;
///邮编
@property (nonatomic, copy)   NSString     *postcode;
///网址
@property (nonatomic, copy)   NSString     *website;
///电子邮件
@property (nonatomic, copy)   NSString     *email;
///省
@property (nonatomic, copy)   NSString     *provinceName;
///省编码
@property (nonatomic, copy)   NSString     *provinceCode;
///城市名称
@property (nonatomic, copy)   NSString     *cityName;
///城市编码
@property (nonatomic, copy)   NSString     *cityCode;
///区域名称
@property (nonatomic, copy)   NSString     *adName;
///区域编码
@property (nonatomic, copy)   NSString     *adCode;
///地理格ID
@property (nonatomic, copy)   NSString     *gridCode;
///入口经纬度
@property (nonatomic, strong)   LatLngModel *enter;
/////出口经纬度
@property (nonatomic, strong)   LatLngModel *exit;
///方向
@property (nonatomic, copy)   NSString     *direction;
///是否有室内地图
@property (nonatomic, assign) BOOL          isIndoorMap;
///所在商圈
@property (nonatomic, copy)   NSString     *businessArea;
///室内信息
@property (nonatomic, strong) SearchMapIndoorData *indoorData;
/////子POI列表
@property (nonatomic, strong) NSArray<SearchMapSubPOI *> *subPois;
///图片列表
@property (nonatomic, strong) NSArray<SearchMapImage *> *photos;
//
/////扩展信息只有在ID查询时有效
@property (nonatomic, strong) SearchMapPOIExtension *poiExtension;


+ (NSArray<SearchMapPoiModel *> *)createSearchMapPoiModelWithArray:(NSArray<AMapPOI *> *)arrays;

@end


@interface SearchMapGeoPoint : AMapSearchObject

///纬度（垂直方向）
@property (nonatomic, strong) NSNumber *latitude;
///经度（水平方向）
@property (nonatomic, strong) NSNumber *longitude;


+ (SearchMapGeoPoint *)createMapGeoPointWithLat:(CGFloat)lat withLng:(CGFloat)lng;

@end


@interface SearchMapIndoorData : NSObject

///楼层，为0时为POI本身
@property (nonatomic, assign) NSInteger floor;
///楼层名称
@property (nonatomic, copy)   NSString  *floorName;
///建筑物ID
@property (nonatomic, copy)   NSString  *pid;

+ (SearchMapIndoorData *)createSearchMapIndoorData:(AMapIndoorData *)indoorData;


@end


@interface SearchMapImage : NSObject

///标题
@property (nonatomic, copy) NSString *title;
///url
@property (nonatomic, copy) NSString *url;

+ (NSArray<SearchMapImage *> *)createSearchMapPoiModelWithArray:(NSArray<AMapImage *> *)arrays;


@end

@interface SearchMapPOIExtension : NSObject

///评分
@property (nonatomic, copy) NSString *rating;
///人均消费
@property (nonatomic, strong) NSNumber *cost;
///营业时间
@property (nonatomic, copy)   NSString *openTime;

+ (SearchMapPOIExtension *)createSearchMapPOIExtension:(AMapPOIExtension *)poiExtension;


@end



@interface SearchMapSubPOI : NSObject

///POI全局唯一ID
@property (nonatomic, copy)   NSString     *poiId;
///名称
@property (nonatomic, copy)   NSString     *title;
///名称简写
@property (nonatomic, copy)   NSString     *subName;
///经纬度
@property (nonatomic, copy)   SearchMapGeoPoint *latLonPoint;
///地址
@property (nonatomic, copy)   NSString     *snippet;
///距中心点距离
@property (nonatomic, assign) NSInteger     distance;
///子POI类型
@property (nonatomic, copy)   NSString     *subTypeDes;

+ (NSArray<SearchMapSubPOI *> *)createSearchMapMapSubPOIWithArray:(NSArray<AMapSubPOI *> *)arrays;


@end

NS_ASSUME_NONNULL_END
